﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HPPClientUI
{
    public partial class FrmDownloadPrompt : MyFormBase
    {
        public FrmDownloadPrompt()
        {
            InitializeComponent();
        }

        public FrmDownloadPrompt(string hash, string path, string filename) 
        {
            SafeInvoke(() =>
                           {
                                this.tbHash.Text = hash;
                                this.tbFileName.Text = filename;
                           });

            
            
        }

        private void btnStart_Click(object sender, EventArgs e)
        {
            string hash = this.tbHash.Text.Trim();
            string filename = this.tbFileName.Text.Trim();
            bool startNow = this.cbStartNow.Checked;
            FrmMain.Client.Download(hash, filename, startNow);

            this.Close();
        }

    }
}
